package day12;

public class Penguin extends Pet {
    private String sex;

    public Penguin(String name, int health, int love, String sex) {
        super(name, health, love);
        this.sex = sex;
    }

    @Override
    public void show() {
        super.show();
        System.out.println("宠物的性别:"+this.sex);
    }

    @Override
    public void eat() {
        System.out.println("企鹅吃鱼");
        super.love+=30;
    }

    @Override
    public void toHospital() {
        System.out.println("企鹅去医院");
        super.health+=30;
    }
    public void youyong(){
        System.out.println("和企鹅一起游泳");
    }
}
